function updateDict() {
    var tips_edit_dict = $MB.i18n('tips.edit.dict'),
        tips_edit_dict_msg = $MB.i18n('tips.edit.dict.msg'),
        dict_edit_title = $MB.i18n('dict.update');
    var selected = $("#dictTable").bootstrapTable("getSelections");
    var selected_length = selected.length;
    if (!selected_length) {
        $MB.n_warning(tips_edit_dict);
        return;
    }
    if (selected_length > 1) {
        $MB.n_warning(tips_edit_dict_msg);
        return;
    }
    var dictId = selected[0].dictId;
    $.post(ctx + "dict/getDict", {"dictId": dictId}, function (r) {
        if (r.code === 0) {
            var $form = $('#dict-add');
            $form.modal();
            var dict = r.msg;
            $("#dict-add-modal-title").html(dict_edit_title);
            $form.find("input[name='dictId']").val(dict.dictId);
            $form.find("input[name='keyy']").val(dict.keyy);
            $form.find("input[name='valuee']").val(dict.valuee);
            $form.find("input[name='tableName']").val(dict.tableName);
            $form.find("input[name='fieldName']").val(dict.fieldName);
            $("#dict-add-button").attr("name", "update");
        } else {
            $MB.n_danger(r.msg);
        }
    });
}